<?
$id += 0;
$tour = new Tour();
$tour->select($id);
$currency = $tour->getCurrencyObj();
$link = "http://".$_SERVER['HTTP_HOST']."/tour-chi-tiet/$id/";
?>
<div class='tour_left'>
	<div class='title_1 cufon' style='width:595px;'>
        Giới thiệu tour
    </div>
    <div class='tour_title' style='padding-top:10px;padding-bottom:10px;color:#2E3192;font-weight:bold;'><?=$tour->getname()?></div>
    
    <div class='slide_tour'>
    	<div class='slide'>
        	<div id='container'>
                <div class="wt-rotator">
                    <img id="bg-img" src="/images/spacer.png"/>
                    <a href="#"><img id="main-img" src="/images/spacer.png"/></a>
                    <div class="preloader"><img src="/images/ajax-loader.gif"/></div>
                    <div class="c-panel">
                        <div class="thumbnails">
                            <ul>
                            <? 	 
                                $pictures = $tour->getAllPictures();
								foreach ($pictures as $picture)
								{
							?>
                                <li>
                                    <a rel="example_group" href="<?=$picture->getPath('tour_ideas_')?>" title="<?=$picture->getname()?>"></a>
                                </li>
                            <? 
								}	
                            ?>	
                            </ul>
                        </div>
                    </div>
                </div>
                </div>
        </div>
        <script>
			$(document).ready(function()
			{
				$(".tour_menu_item").live('click',function()
				{
					if (!$(this).hasClass('active'))
					{
						$("#load_tour_content").css('opacity','0.5');
						$(".tour_menu_item").removeClass('active');
						var mod = $(this).attr('rel');
						var query = 'act=tour_load_content&id=<?=$id?>&mod='+mod;
						$(this).addClass('active');
						$.ajaxIt(query,'/action.php',function(x)
						{
							x = $.trim(x);
							$("#load_tour_content").html(x);
							$("#load_tour_content").css('opacity','1');
						});
					}
				});
			});
		</script>
        <div class='tour_information'>
        	<?
			if ($tour->getpromotion() != 0)
			{
			?>
			<div class='tour_ideas_price' style='width:120px;background:none;margin:0 auto;'><span style='text-decoration:line-through;color:#c00;font-size:12px;font-weight:bold;'>&nbsp; <span style='color:#000;'><?=lg_number::money($currency->getVND($tour->getprice()))?> VNĐ</span> &nbsp;</span></div>
			<?
			}
			?>
			<div class='tour_ideas_price' style='width:120px;margin:0 auto;margin-bottom:10px;'><?=lg_number::money($currency->getVND($tour->getRealPrice()))?> VNĐ</div>
            <div style='line-height:18px;'>
            	<b>Ngày đi : <span style='color:#186BBC;'><?=lg_date::dmy2ymd($tour->getstart_date())?></span></b><br />
                <b>Ngày đến : <span style='color:#186BBC;'><?=lg_date::dmy2ymd($tour->getend_date())?></span></b><br />
                <b>Số ngày : <span style='color:#186BBC;'><?=($tour->getnumber_day())?></span> - Số đêm : <span style='color:#186BBC;'><?=$tour->getnumber_night()?></span> </b> <br />
                <b>Khởi hành : <span style='color:#186BBC;'><?=($tour->getDeparture()->getname())?></span></b><br />
                <b>Điểm đến : <span style='color:#186BBC;'><?=$tour->getDestination()->getname()?></span></b><br />
            </div>
        </div>
        <div style='clear:both'></div>
    </div>
    
    <div class='tour_menu' style=''>
        <div class='tour_menu_item active' rel='description'>Giới thiệu</div>
        <div class='tour_menu_item' rel='quy_trinh'>Hành trình</div>
        <div class='tour_menu_item' rel='booking' style='margin-right:0;'>Đặt tour</div>
        <div style='clear:both'></div>
    </div>
    
    <div class='tour_content' id='load_tour_content' rel="<?=$tour->getid()?>">
    	<?=$tour->getdescription()?>
    </div>
</div>
<div class='tour_right'>
<?
$tours = Tour::getAllTours();
include('z_includes/tour_right.php');
?>
</div>
<div style='clear:both'></div>